home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / VISUAL_B / H441.ZIP / VXBTEST.ZIP / VXBTEST.BAS < prev    next >
BASIC Source File  |  1993-05-06  |  27KB  |  572 lines

  1. ' vxBase Sample Application
  2. ' Aircraft Brokerage System
  3. ' ------------------------
  4.  
  5. ' Declare file select areas as Global
  6. ' so they can be accessed from any form
  7. ' -------------------------------------
  8. Global AirPicsDbf As Integer
  9. Global AirtypesDbf As Integer
  10. Global AirTypesNtx As Integer
  11. Global AircustDbf As Integer
  12. Global Aircust1Ntx As Integer
  13. Global Aircust2Ntx As Integer
  14. Global Aircust3Ntx As Integer
  15. Global AirstateDbf As Integer
  16. Global Airstat1Ntx As Integer
  17. Global Airstat2Ntx As Integer
  18. Global AirbuyerDbf As Integer
  19. Global Airbuy1Ntx As Integer
  20. Global Airbuy2Ntx As Integer
  21. Global AircraftDbf As Integer
  22. Global Aircraf1Ntx As Integer
  23. Global Aircraf2Ntx As Integer
  24.  
  25. ' vars for each browse return so other forms can interrogate
  26. ' ----------------------------------------------------------
  27. Global TypeReturn As Long
  28. Global CustReturn As Long
  29. Global BuyerReturn As Long
  30. Global AircraftReturn As Long
  31. Global StateReturn As Long
  32.  
  33. ' vars to hold internal linkage keys
  34. ' ----------------------------------
  35. Global CustKey As String
  36. Global TypeKey As String
  37. Global BuyerRec As Long
  38.  
  39. ' Form active vars so we can test if any active
  40. ' when we close the system down in vxform1
  41. ' ----------------------------------------------
  42. Global Form2Active As Integer
  43. Global Form3Active As Integer
  44. Global Form4Active As Integer
  45. Global Form5Active As Integer
  46. Global Form6Active As Integer
  47. Global Form7Active As Integer
  48.  
  49. ' Define some WINAPI stuff to limit text length and change cursors
  50. ' ----------------------------------------------------------------
  51. Declare Function GetFocus% Lib "user" ()
  52. Declare Function SetFocusApi Lib "user" Alias "SetFocus" (ByVal Hwnd As Integer) As Integer
  53. Declare Function SendMessage& Lib "user" (ByVal Hwnd%, ByVal wMsg%, ByVal wParam%, ByVal lParam&)
  54. Global Const WM_USER = &H400
  55. Global Const EM_LIMITTEXT = WM_USER + 21
  56. Global Const WM_CLOSE = &H10
  57.  
  58. Declare Function LoadCursor Lib "user" (ByVal hInstance As Integer, ByVal CursorName As Long) As Integer
  59. Declare Function SetCursor Lib "user" (ByVal hCursor As Integer) As Integer
  60. Global Const IDC_WAIT = 32514&
  61. Global Const IDC_ARROW = 32512&
  62.  
  63. ' winapi stuff to limit to a single app or to get browse handle
  64. ' -------------------------------------------------------------
  65. Declare Function FindWindow Lib "user" (ByVal ClassName As Any, ByVal Caption As Any) As Integer
  66.  
  67. ' ----------------------------------------------
  68. ' vxBase.txt contains the necessary declarations
  69. ' to run vxBase from Visual Basic
  70. ' ----------------------------------------------
  71. ' vxBase Global Constants
  72. ' -----------------------
  73. Global Const BROWSE_CLOSED = -1
  74. Global Const BROWSE_EDIT = -2
  75. Global Const BROWSE_ADD = -3
  76. Global Const BROWSE_DELETE = -4
  77. Global Const BROWSE_ERROR = -5
  78. Global Const BROWSE_USER = -6
  79.  
  80. ' vxBase Color References for user tables
  81. ' ---------------------------------------
  82. Global Const VX_RED = &HFF
  83. Global Const VX_BLUE = &HFF0000
  84. Global Const VX_GRAY = &HC0C0C0
  85.  
  86. ' vxBase Control style modes
  87. ' --------------------------
  88. Global Const VX_RAISE = 0
  89. Global Const VX_RECESS = 1
  90. Global Const VX_CREASE = 2
  91. Global Const VX_FLAT = 3
  92.  
  93. ' vxBase Table Field Types
  94. ' ------------------------
  95. Global Const VX_FIELD = 0
  96. Global Const VX_EXPR = 1
  97.  
  98. ' browse case types
  99. ' -----------------
  100. Global Const VX_UPPER = 0
  101. Global Const VX_LOWER = 1
  102.  
  103. ' vxCtlFormat defs
  104. ' ----------------
  105. Global Const VX_CHAR = 1
  106. Global Const VX_ALPHA = 2
  107. Global Const VX_NUM = 3
  108. Global Const VX_DATE = 4
  109. Global Const VX_PASSWORD = 5
  110.  
  111. ' vxBase String Return Types
  112. ' --------------------------
  113. Global Const VX_VBSTRING = 0
  114. Global Const VX_ASCIIZ = 1
  115.  
  116. ' vxBase Menu item identifiers
  117. ' ----------------------------
  118. Global Const VX_SEPBAR = 2
  119. Global Const VX_MENUHEAD = 1
  120. Global Const VX_RETURN = 0
  121.  
  122. ' Country specific identifiers
  123. ' ----------------------------
  124. Global Const VX_ENGLISH = 0
  125. Global Const VX_AMERICAN = 0
  126. Global Const VX_ANSI = 1
  127. Global Const VX_BRITISH = 2
  128. Global Const VX_FRENCH = 3
  129. Global Const VX_GERMAN = 4
  130. Global Const VX_ITALIAN = 5
  131. Global Const VX_DUTCH = 6
  132. Global Const VX_SPANISH = 7
  133.  
  134. ' directions for locate
  135. ' ---------------------
  136. Global Const VX_FORWARD = 0
  137. Global Const VX_BACKWARD = 1
  138.  
  139. ' font weights for vxBrowseSetup
  140. ' ------------------------------
  141. Global Const VX_DONTCARE = 0
  142. Global Const VX_THIN = 100
  143. Global Const VX_EXTRALIGHT = 200
  144. Global Const VX_LIGHT = 300
  145. Global Const VX_NORMAL = 400
  146. Global Const VX_MEDIUM = 500
  147. Global Const VX_SEMIBOLD = 600
  148. Global Const VX_BOLD = 700
  149. Global Const VX_EXTRABOLD = 800
  150. Global Const VX_HEAVY = 900
  151.  
  152. ' vxCtlBrowseMsg Message values
  153. ' -----------------------------
  154. Global Const VXB_REFRESH = 0
  155. Global Const VXB_FILTERDLG = 1
  156. Global Const VXB_FILTERPRG = 2
  157. Global Const VXB_GETCURRENTREC = 3
  158. Global Const VXB_GETTOPREC = 4
  159. Global Const VXB_STATS = 5
  160. Global Const VXB_CASE = 6
  161. Global Const VXB_SEARCHDLG = 7
  162. Global Const VXB_SEARCHPRG = 8
  163. Global Const VXB_SEARCHAGAIN = 9
  164. Global Const VXB_SEEK = 10
  165. Global Const VXB_CLOSE = 11
  166.  
  167.  
  168. ' vxBase CALLed Sub Procedures
  169. ' ----------------------------
  170. Declare Sub vxBrowse Lib "vxbase.dll" (ByVal Hwnd%, ByVal DbfArea%, ByVal NtxArea%, ByVal EditMode%, ByVal AllowFilter%, ByVal EditMenu%, ByVal StartRec&, ByVal Caption$, RetVal&)
  171. Declare Sub vxBrowseCase Lib "vxbase.dll" (ByVal DefCase As Integer)
  172. Declare Sub vxBrowsePos Lib "vxbase.dll" (ByVal StartX As Integer, ByVal StartY As Integer, ByVal xWidth As Integer, ByVal yHeight As Integer)
  173. Declare Sub vxBrowseSetup Lib "vxbase.dll" (ByVal Menus%, ByVal PrintMenu%, ByVal QCol%, ByVal V3D%, ByVal FontName$, ByVal FontSize%, ByVal Weight%, ByVal Italic%, ByVal Hdr%, ByVal MinMax%, ByVal Thresh%)
  174. Declare Sub vxCtlGrayReset Lib "vxbase.dll" ()
  175. Declare Sub vxCtlGraySet Lib "vxbase.dll" ()
  176. Declare Sub vxCtlLength Lib "vxbase.dll" (ByVal FieldName As String)
  177. Declare Sub vxCtlPenWidth Lib "vxbase.dll" (ByVal PenWidth As Integer)
  178. Declare Sub vxCtlStyle Lib "vxbase.dll" (CtlName As Any, ByVal Mode As Integer)
  179. Declare Sub vxDouble Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  180. Declare Sub vxExactOff Lib "vxbase.dll" ()
  181. Declare Sub vxExactOn Lib "vxbase.dll" ()
  182. Declare Sub vxFilter Lib "vxbase.dll" (ByVal FilterString As String)
  183. Declare Sub vxFilterReset Lib "vxbase.dll" ()
  184. Declare Sub vxFormFrame Lib "vxbase.dll" (ByVal Hwnd As Integer)
  185. Declare Sub vxInit Lib "vxbase.dll" ()
  186. Declare Sub vxJoin Lib "vxbase.dll" (ByVal DbfArea As Integer, ByVal NtxArea As Integer, ByVal JoinExpr As String, ByVal KeyType As Integer, ByVal JoinTitle As String)
  187. Declare Sub vxJoinNoAuto Lib "vxbase.dll" ()
  188. Declare Sub vxJoinReset Lib "vxbase.dll" ()
  189. Declare Sub vxMemoEdit Lib "vxbase.dll" (ByVal Hwnd As Integer, ByVal FieldName As String)
  190. Declare Sub vxMenuDeclare Lib "vxbase.dll" (ByVal NumItems As Integer)
  191. Declare Sub vxMenuItem Lib "vxbase.dll" (ByVal MenuIndex As Integer, ByVal MenuLev As Integer, ByVal MenuString As String, ByVal MenuType As Integer)
  192. Declare Sub vxReplDate Lib "vxbase.dll" (ByVal FieldName As String, ByVal DateString As String)
  193. Declare Sub vxReplDateString Lib "vxbase.dll" (ByVal FieldName As String, ByVal DateString As String)
  194. Declare Sub vxReplDouble Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  195. Declare Sub vxReplInteger Lib "vxbase.dll" (ByVal FieldName As String, IntAmount As Integer)
  196. Declare Sub vxReplLogical Lib "vxbase.dll" (ByVal FieldName As String, ByVal BoolVal As Integer)
  197. Declare Sub vxReplLong Lib "vxbase.dll" (ByVal FieldName As String, LongInt As Long)
  198. Declare Sub vxReplRecord Lib "vxbase.dll" (RecStruc As Any)
  199. Declare Sub vxReplString Lib "vxbase.dll" (ByVal FieldName As String, ByVal FieldString As String)
  200. Declare Sub vxSetDate Lib "vxbase.dll" (ByVal DateType As Integer)
  201. Declare Sub vxSetErrorCaption Lib "vxbase.dll" (ByVal CaptionString As String)
  202. Declare Sub vxSetErrorMethod Lib "vxbase.dll" (ByVal VbOrVx As Integer)
  203. Declare Sub vxSetLanguage Lib "vxbase.dll" (ByVal LangType As Integer)
  204. Declare Sub vxSetLocks Lib "vxbase.dll" (ByVal OnOrOff As Integer)
  205. Declare Sub vxSetMeters Lib "vxbase.dll" (ByVal OnOrOff As Integer)
  206. Declare Sub vxSetString Lib "vxbase.dll" (ByVal StrType As Integer)
  207. Declare Sub vxSetupPrinter Lib "vxbase.dll" (ByVal Hwnd As Integer)
  208. Declare Sub vxSum Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  209. Declare Sub vxTableDeclare Lib "vxbase.dll" (ByVal ColorRef&, BofExpr As Any, EofExpr As Any, ByVal Scope%, ByVal Quick%, ByVal Columns%)
  210. Declare Sub vxTableField Lib "vxbase.dll" (ByVal ColIndex As Integer, ByVal ColHead As String, ByVal ColExpr As String, ByVal ColType As Integer)
  211. Declare Sub vxTableFieldExt Lib "vxbase.dll" (ByVal ColIndex As Integer, ByVal ColHead As String, ByVal ColExpr As String, ByVal ColType As Integer, ByVal ColWidth As Integer, ByVal DbfArea As Integer)
  212. Declare Sub vxTableReset Lib "vxbase.dll" ()
  213. Declare Sub vxWindowDereg Lib "vxbase.dll" (ByVal Hwnd As Integer)
  214.  
  215.  
  216. ' vxBase Functions
  217. ' ----------------
  218. Declare Function vxAppendBlank Lib "vxbase.dll" () As Integer
  219. Declare Function vxAppendFrom Lib "vxbase.dll" (ByVal FromFile As String) As Integer
  220. Declare Function vxAreaDbf Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  221. Declare Function vxAreaNtx Lib "vxbase.dll" (ByVal NtxName As String) As Integer
  222. Declare Function vxBof Lib "vxbase.dll" () As Integer
  223. Declare Function vxBottom Lib "vxbase.dll" () As Integer
  224. Declare Function vxChar Lib "vxbase.dll" (ByVal FieldName As String) As String
  225. Declare Function vxClose Lib "vxbase.dll" () As Integer
  226. Declare Function vxCloseAll Lib "vxbase.dll" () As Integer
  227. Declare Function vxCloseNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  228. Declare Function vxCopy Lib "vxbase.dll" (ByVal NewDbfName As String) As Integer
  229. Declare Function vxCopyStruc Lib "vxbase.dll" (ByVal NewDbfName As String) As Integer
  230. Declare Function vxCreateNtx Lib "vxbase.dll" (ByVal NewNtxName As String, ByVal NtxExpr As String) As Integer
  231. Declare Function vxCtlHwnd Lib "vxbase.dll" (ControlName As Any) As Integer
  232. Declare Function vxCtlBrowse Lib "vxbase.dll" (ByVal ControlHwnd%, ByVal DbfArea%, ByVal NtxArea%, ByVal EditMode%, ByVal StartRec&, ByVal MemoHwnd%, ByVal MemoField$) As Integer
  233. Declare Function vxCtlBrowseMsg Lib "vxbase.dll" (ByVal Hwnd As Integer, ByVal Msg As Integer, Param As Any) As Long
  234. Declare Function vxCtlFormat Lib "vxbase.dll" (ByVal TextLen As Integer, ByVal Picture As Integer, ByVal Decimals As Integer) As Integer
  235. Declare Function vxDateFormat Lib "vxbase.dll" (ByVal DateField As String) As String
  236. Declare Function vxDateString Lib "vxbase.dll" (ByVal DateField As String, ByVal DateType As Integer) As String
  237. Declare Function vxDbfDate Lib "vxbase.dll" () As String
  238. Declare Function vxDbfName Lib "vxbase.dll" () As String
  239. Declare Function vxDeallocate Lib "vxbase.dll" () As Integer
  240. Declare Function vxDecimals Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  241. Declare Function vxDeleted Lib "vxbase.dll" () As Integer
  242. Declare Function vxDeleteRange Lib "vxbase.dll" (ByVal StartRec As Long, ByVal EndRec As Long) As Integer
  243. Declare Function vxDeleteRec Lib "vxbase.dll" () As Integer
  244. Declare Function vxDescend Lib "vxbase.dll" (ByVal KeyString As String) As String
  245. Declare Function vxEmpty Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  246. Declare Function vxEof Lib "vxbase.dll" () As Integer
  247. Declare Function vxEval Lib "vxbase.dll" (ByVal XBaseExpr As String) As Integer
  248. Declare Function vxEvalDouble Lib "vxbase.dll" (ByVal XBaseExpr As String, DblAmount As Double) As Integer
  249. Declare Function vxEvalLogical Lib "vxbase.dll" (ByVal XBaseExpr As String, ByVal TrueFalse As String) As Integer
  250. Declare Function vxEvalString Lib "vxbase.dll" (ByVal XBaseExpr As String, ByVal StringVal As String) As Integer
  251. Declare Function vxField Lib "vxbase.dll" (ByVal FieldName As String) As String
  252. Declare Function vxFieldCount Lib "vxbase.dll" () As Integer
  253. Declare Function vxFieldName Lib "vxbase.dll" (ByVal FieldNumber As Integer) As String
  254. Declare Function vxFieldSize Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  255. Declare Function vxFieldTrim Lib "vxbase.dll" (ByVal FieldName As String) As String
  256. Declare Function vxFieldType Lib "vxbase.dll" (ByVal FieldName As String) As String
  257. Declare Function vxFile Lib "vxbase.dll" (ByVal FileName As String) As Integer
  258. Declare Function vxFound Lib "vxbase.dll" () As Integer
  259. Declare Function vxGetVersion Lib "vxbase.dll" () As String
  260. Declare Function vxGo Lib "vxbase.dll" (ByVal RecNum As Long) As Integer
  261. Declare Function vxInteger Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  262. Declare Function vxIsMemo Lib "vxbase.dll" (ByVal MemoFieldName As String) As Integer
  263. Declare Function vxIsPicture Lib "vxbase.dll" (ByVal MemoFieldName As String) As Integer
  264. Declare Function vxIsRecLocked Lib "vxbase.dll" () As Integer
  265. Declare Function vxLocate Lib "vxbase.dll" (ByVal XBaseExpr As String, ByVal Direction As Integer) As Long
  266. Declare Function vxLocateAgain Lib "vxbase.dll" (ByVal Direction As Integer) As Long
  267. Declare Function vxLockDbf Lib "vxbase.dll" () As Integer
  268. Declare Function vxLocked Lib "vxbase.dll" () As Integer
  269. Declare Function vxLockRecord Lib "vxbase.dll" () As Integer
  270. Declare Function vxLong Lib "vxbase.dll" (ByVal FieldName As String) As Long
  271. Declare Function vxMemoRead Lib "vxbase.dll" (ByVal FieldName As String, ByVal LineWidth As Integer) As String
  272. Declare Function vxNtxCurrent Lib "vxbase.dll" () As Integer
  273. Declare Function vxNtxDeselect Lib "vxbase.dll" () As Integer
  274. Declare Function vxNtxExpr Lib "vxbase.dll" (ByVal NtxArea As Integer) As String
  275. Declare Function vxNtxName Lib "vxbase.dll" (ByVal NtxArea As Integer) As String
  276. Declare Function vxNtxRecNo Lib "vxbase.dll" () As Long
  277. Declare Function vxNumRecs Lib "vxbase.dll" () As Long
  278. Declare Function vxPack Lib "vxbase.dll" (ByVal Hwnd As Integer) As Integer
  279. Declare Function vxPictureImport Lib "vxbase.dll" (ByVal FileName As String, ByVal FieldName As String) As Integer
  280. Declare Function vxPictureRead Lib "vxbase.dll" (ByVal Hwnd As Integer, ByVal FieldName As String) As Integer
  281. Declare Function vxPrinterDefault Lib "vxbase.dll" () As String
  282. Declare Function vxPrinterEnum Lib "vxbase.dll" (ByVal PIndex As Integer) As String
  283. Declare Function vxPrinterSelect Lib "vxbase.dll" (ByVal PrinterName As String) As Integer
  284. Declare Function vxRecall Lib "vxbase.dll" () As Integer
  285. Declare Function vxRecNo Lib "vxbase.dll" () As Long
  286. Declare Function vxRecord Lib "vxbase.dll" (RecStruc As Any) As Integer
  287. Declare Function vxRecSize Lib "vxbase.dll" () As Integer
  288. Declare Function vxReindex Lib "vxbase.dll" () As Integer
  289. Declare Function vxReplMemo Lib "vxbase.dll" (ByVal FieldName As String, ByVal MemoString As String) As Integer
  290. Declare Function vxSeek Lib "vxbase.dll" (ByVal SearchKey As String) As Integer
  291. Declare Function vxSeekFast Lib "vxbase.dll" (ByVal SearchKey As String) As Integer
  292. Declare Function vxSeekSoft Lib "vxbase.dll" (ByVal SearchKey As String) As Integer
  293. Declare Function vxSelectDbf Lib "vxbase.dll" (ByVal DbfArea As Integer) As Integer
  294. Declare Function vxSelectNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  295. Declare Function vxSetAlias Lib "vxbase.dll" (ByVal AliasName As String, ByVal DbfArea As Integer) As Integer
  296. Declare Function vxSetHandles Lib "vxbase.dll" (ByVal NumHandles As Integer) As Integer
  297. Declare Function vxSetRelation Lib "vxbase.dll" (ByVal ToDbfArea As Integer, ByVal KeyConstructor As String) As Integer
  298. Declare Function vxSkip Lib "vxbase.dll" (ByVal NumRecords As Long) As Integer
  299. Declare Function vxTestNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  300. Declare Function vxTop Lib "vxbase.dll" () As Integer
  301. Declare Function vxTrue Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  302. Declare Function vxUnlock Lib "vxbase.dll" () As Integer
  303. Declare Function vxUseDbf Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  304. Declare Function vxUseDbfRO Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  305. Declare Function vxUseNtx Lib "vxbase.dll" (ByVal NtxName As String) As Integer
  306. Declare Function vxWrite Lib "vxbase.dll" () As Integer
  307. Declare Function vxWriteHdr Lib "vxbase.dll" () As Integer
  308. Declare Function vxZap Lib "vxbase.dll" () As Integer
  309.  
  310.  
  311. ' ---------------------------------------
  312. ' File structure data type. Add more
  313. ' elements or delete unnecessary elements
  314. ' as required by the largest dbf creation
  315. ' in your application
  316. ' ---------------------------------------
  317.  
  318. Type FileStruc
  319.    Fld01 As String * 16
  320.    Fld02 As String * 16
  321.    Fld03 As String * 16
  322.    Fld04 As String * 16
  323.    Fld05 As String * 16
  324.    Fld06 As String * 16
  325.    Fld07 As String * 16
  326.    Fld08 As String * 16
  327.    Fld09 As String * 16
  328.    Fld10 As String * 16
  329.    Fld11 As String * 16
  330.    Fld12 As String * 16
  331.    Fld13 As String * 16
  332.    Fld14 As String * 16
  333.    Fld15 As String * 16
  334.    Fld16 As String * 16
  335.    Fld17 As String * 16
  336.    Fld18 As String * 16
  337.    Fld19 As String * 16
  338.    Fld20 As String * 16
  339.    Fld21 As String * 16
  340.    Fld22 As String * 16
  341.    Fld23 As String * 16
  342.    Fld24 As String * 16
  343.    Fld25 As String * 16
  344.    Fld26 As String * 16
  345.    Fld27 As String * 16
  346.    Fld28 As String * 16
  347.    Fld29 As String * 16
  348.    Fld30 As String * 16
  349.    Fld31 As String * 16
  350.    Fld32 As String * 16
  351. End Type
  352.  
  353. ' declare functions that use FileStruc type
  354. ' -----------------------------------------
  355. Declare Function vxCreateDbf Lib "vxbase.dll" (ByVal NewDbfName As String, ByVal NumFields As Integer, FStructure As FileStruc) As Integer
  356.  
  357. ' ----------------------------------------
  358. ' define types file record structure for
  359. ' use in vxform8 and the vxRecord  and
  360. ' vxReplRecord functions
  361. ' ----------------------------------------
  362. Type CatRec
  363.    cDelFlag As String * 1
  364.    Category As String * 3
  365.    CatName As String * 35
  366. End Type
  367. ' note that every xbase record structure MUST begin
  368. ' with a single character deletion flag
  369. ' -------------------------------------------------
  370.  
  371. Type vxErrorStruc
  372.    ErrorNum As Integer
  373.    ErrorMsg As String * 80
  374.    DbfArea As Integer
  375.    NtxArea As Integer
  376.    DbfName As String * 80
  377.    NtxName As String * 80
  378.    BadParm As String * 80
  379. End Type
  380.  
  381. Declare Function vxErrorTest Lib "vxbase.dll" (ErrorStructure As vxErrorStruc) As Integer
  382.  
  383. Global vxError As vxErrorStruc
  384.  
  385. '============================================================================'
  386. '                                                                            '
  387. ' Visual Basic global constant file.  This file can be loaded into the       '
  388. ' global module.                                                             '
  389. '                                                                            '
  390. ' Some constants are commented out because they have duplicates (for         '
  391. ' example, NONE appears in several places).                                  '
  392. '                                                                            '
  393. '============================================================================'
  394.  
  395. '========='
  396. '         '
  397. ' General '
  398. '         '
  399. '========='
  400.  
  401. '====================='
  402. '                     '
  403. ' Function parameters '
  404. '                     '
  405. '====================='
  406.  
  407. ' MsgBox parameters
  408. Global Const MB_OK = 0                 ' OK button only
  409. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  410. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  411. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  412. Global Const MB_YESNO = 4              ' Yes and No buttons
  413. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  414.  
  415. Global Const MB_ICONSTOP = 16          ' Critical message
  416. Global Const MB_ICONQUESTION = 32      ' Warning query
  417. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  418. Global Const MB_ICONINFORMATION = 64   ' Information message
  419.  
  420. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  421. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  422. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  423.  
  424. ' MsgBox return values
  425. Global Const IDOK = 1                  ' OK button pressed
  426. Global Const IDCANCEL = 2              ' Cancel button pressed
  427. Global Const IDABORT = 3               ' Abort button pressed
  428. Global Const IDRETRY = 4               ' Retry button pressed
  429. Global Const IDIGNORE = 5              ' Ignore button pressed
  430. Global Const IDYES = 6                 ' Yes button pressed
  431. Global Const IDNO = 7                  ' No button pressed
  432.  
  433. '================='
  434. '                 '
  435. ' Property values '
  436. '                 '
  437. '================='
  438.  
  439. ' Alignment (label)
  440. Global Const LEFT_JUSTIFY = 0          ' 0 - Left Justify
  441. Global Const RIGHT_JUSTIFY = 1         ' 1 - Right Justify
  442. Global Const CENTER = 2                ' 2 - Center
  443.  
  444. ' BackColor, ForeColor, FillColor (standard RGB colors: form, controls)
  445. Global Const BLACK = &H0&
  446. Global Const RED = &HFF&
  447. Global Const GREEN = &HFF00&
  448. Global Const YELLOW = &HFFFF&
  449. Global Const BLUE = &HFF0000
  450. Global Const MAGENTA = &HFF00FF
  451. Global Const CYAN = &HFFFF00
  452. Global Const WHITE = &HFFFFFF
  453.  
  454. ' BackColor, ForeColor, FillColor (system colors: form, controls)
  455. Global Const SCROLL_BARS = &H80000000           ' Scroll-bars gray area.
  456. Global Const DESKTOP = &H80000001               ' Desktop.
  457. Global Const ACTIVE_TITLE_BAR = &H80000002      ' Active window caption.
  458. Global Const INACTIVE_TITLE_BAR = &H80000003    ' Inactive window caption.
  459. Global Const MENU_BAR = &H80000004              ' Menu background.
  460. Global Const WINDOW_BACKGROUND = &H80000005     ' Window background.
  461. Global Const WINDOW_FRAME = &H80000006          ' Window frame.
  462. Global Const MENU_TEXT = &H80000007             ' Text in menus.
  463. Global Const WINDOW_TEXT = &H80000008           ' Text in windows.
  464. Global Const TITLE_BAR_TEXT = &H80000009        ' Text in caption, size box, scroll-bar arrow box..
  465. Global Const ACTIVE_BORDER = &H8000000A         ' Active window border.
  466. Global Const INACTIVE_BORDER = &H8000000B       ' Inactive window border.
  467. Global Const APPLICATION_WORKSPACE = &H8000000C ' Background color of multiple document interface (MDI) applications.
  468. Global Const HIGHLIGHT = &H8000000D             ' Items selected item in a control.
  469. Global Const HIGHLIGHT_TEXT = &H8000000E        ' Text of item selected in a control.
  470. Global Const BUTTON_FACE = &H8000000F           ' Face shading on command buttons.
  471. Global Const BUTTON_SHADOW = &H80000010         ' Edge shading on command buttons.
  472. Global Const GRAY_TEXT = &H80000011             ' Grayed (disabled) text.  This color is set to 0 if the current display driver does not support a solid gray color.
  473. Global Const BUTTON_TEXT = &H80000012           ' Text on push buttons.
  474.  
  475. ' BorderStyle (form, label, picture box, text box)
  476. Global Const NONE = 0                  ' 0 - None
  477. Global Const FIXED_SINGLE = 1          ' 1 - Fixed Single
  478. Global Const SIZABLE = 2               ' 2 - Sizable (Forms only)
  479. Global Const FIXED_DOUBLE = 3          ' 3 - Fixed Double (Forms only)
  480.  
  481. ' DragMode (controls)
  482. Global Const MANUAL = 0                ' 0 - Manual
  483. Global Const AUTOMATIC = 1             ' 1 - Automatic
  484.  
  485. ' DrawMode (form, picture box, Printer)
  486. Global Const BLACKNESS = 1             ' 1 - Blackness
  487. Global Const NOT_MERGE_PEN = 2         ' 2 - Not Merge Pen
  488. Global Const MASK_NOT_PEN = 3          ' 3 - Mask Not Pen
  489. Global Const NOT_COPY_PEN = 4          ' 4 - Not Copy Pen
  490. Global Const MASK_PEN_NOT = 5          ' 5 - Mask Pen Not
  491. Global Const INVERT = 6                ' 6 - Invert
  492. Global Const XOR_PEN = 7               ' 7 - Xor Pen
  493. Global Const NOT_MASK_PEN = 8          ' 8 - Not Mask Pen
  494. Global Const MASK_PEN = 9              ' 9 - Mask Pen
  495. Global Const NOT_XOR_PEN = 10          ' 10 - Not Xor Pen
  496. Global Const NOP = 11                  ' 11 - Nop
  497. Global Const MERGE_NOT_PEN = 12        ' 12 - Merge Not Pen
  498. Global Const COPY_PEN = 13             ' 13 - Copy Pen
  499. Global Const MERGE_PEN_NOT = 14        ' 14 - Merge Pen Not
  500. Global Const MERGE_PEN = 15            ' 15 - Merge Pen
  501. Global Const WHITENESS = 16            ' 16 - Whiteness
  502.  
  503. ' DrawStyle (form, picture box, Printer)
  504. Global Const SOLID = 0                 ' 0 - Solid
  505. Global Const DASH = 1                  ' 1 - Dash
  506. Global Const DOT = 2                   ' 2 - Dot
  507. Global Const DASH_DOT = 3              ' 3 - Dash-Dot
  508. Global Const DASH_DOT_DOT = 4          ' 4 - Dash-Dot-Dot
  509. Global Const INVISIBLE = 5             ' 5 - Invisible
  510. Global Const INSIDE_SOLID = 6          ' 6 - Inside Solid
  511.  
  512. ' FillStyle (form, picture box, Printer)
  513. ' Global Const SOLID = 0               ' 0 - Solid
  514. Global Const TRANSPARENT = 1           ' 1 - Transparent
  515. Global Const HORIZONTAL_LINE = 2       ' 2 - Horizontal Line
  516. Global Const VERTICAL_LINE = 3         ' 3 - Vertical Line
  517. Global Const UPWARD_DIAGONAL = 4       ' 4 - Upward Diagonal
  518. Global Const DOWNWARD_DIAGONAL = 5     ' 5 - Downward Diagonal
  519. Global Const CROSS = 6                 ' 6 - Cross
  520. Global Const DIAGONAL_CROSS = 7        ' 7 - Diagonal Cross
  521.  
  522. ' LinkMode (controls)
  523. ' Global Const NONE = 0                ' 0 - None
  524. Global Const HOT = 1                   ' 1 - Hot
  525. Global Const COLD = 2                  ' 2 - Cold
  526.  
  527. ' LinkMode (form)
  528. ' Global Const NONE = 0                ' 0 - None
  529. Global Const SERVER = 1                ' 1 - Server
  530.  
  531. ' MousePointer (form, controls)
  532. Global Const DEFAULT = 0               ' 0 - Default
  533. Global Const ARROW = 1                 ' 1 - Arrow
  534. Global Const CROSSHAIR = 2             ' 2 - Cross
  535. Global Const IBEAM = 3                 ' 3 - I-Beam
  536. Global Const ICON_POINTER = 4          ' 4 - Icon
  537. Global Const SIZE_POINTER = 5          ' 5 - Size
  538. Global Const SIZE_NE_SW = 6            ' 6 - Size NE SW
  539. Global Const SIZE_N_S = 7              ' 7 - Size N S
  540. Global Const SIZE_NW_SE = 8            ' 8 - Size NW SE
  541. Global Const SIZE_W_E = 9              ' 9 - Size W E
  542. Global Const UP_ARROW = 10             ' 10 - Up Arrow
  543. Global Const HOURGLASS = 11            ' 11 - Hourglass
  544. Global Const NO_DROP = 12              ' 12 - No drop
  545.  
  546. ' ScaleMode (form, picture box, Printer)
  547. Global Const USER = 0                  ' 0 - User
  548. Global Const TWIPS = 1                 ' 1 - Twip
  549. Global Const POINTS = 2                ' 2 - Point
  550. Global Const PIXELS = 3                ' 3 - Pixel
  551. Global Const CHARACTERS = 4            ' 4 - Character
  552. Global Const INCHES = 5                ' 5 - Inch
  553. Global Const MILLIMETERS = 6           ' 6 - Millimeter
  554. Global Const CENTIMETERS = 7           ' 7 - Centimeter
  555.  
  556. ' ScrollBar (text box)
  557. ' Global Const NONE = 0                ' 0 - None
  558. Global Const HORIZONTAL = 1            ' 1 - Horizontal
  559. Global Const VERTICAL = 2              ' 2 - Vertical
  560. Global Const BOTH = 3                  ' 3 - Both
  561.  
  562. ' Value (check box)
  563. Global Const UNCHECKED = 0             ' 0 - Unchecked
  564. Global Const CHECKED = 1               ' 1 - Checked
  565. Global Const GRAYED = 2                ' 2 - Grayed
  566.  
  567. ' WindowState (form)
  568. Global Const NORMAL = 0                ' 0 - Normal
  569. Global Const MINIMIZED = 1             ' 1 - Minimized
  570. Global Const MAXIMIZED = 2             ' 2 - Maximized
  571.  
  572.